<?php namespace Admin\Controller;

/**
 * 商品图集管理
 */
class PicsController extends AuthController{
	protected $db;

	public function __init()
	{
		$this->db = new \Admin\Model\Pics;
	}

	//删除图片
	public function del()
	{
		if($this->db->remove($_GET['id']))
		{
			View::ajax(array('code'=>0,'message'=>'删除成功'));
		}
		else
		{
			View::ajax(array('code'=>1,'message'=>$this->db->getError()));
		}
	}
}